﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ConfigMenu.aspx.cs" Inherits="ConfigMenu" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

            <asp:Panel ID="emptyPanel" runat="server" visible="false">
                <div align="center">
                     <h1><%=mNamePanel%></h1>
                </div>
            </asp:Panel>

            <asp:Panel ID="listPanel" runat="server" visible="false" >
                <asp:Button runat="server" ID="refreshButton" Text="[]" OnClick="refreshButton_Click" />
                <asp:button runat="server" ID="addNewButton" text="Adauga" onclick="newButton_Click" Visible="false" />&nbsp;
                <asp:Button runat="server" ID="editButton" Text="Editare" OnClick="editButton_Click" Visible="false" />&nbsp;
                <asp:Button runat="server" ID="deleteButton" Text="Sterge" OnClick="deleteButton_Click" Visible="false"  OnClientClick="return confirm('Sunteti sigur ca vreti sa stergeti?');" />
                <hr />
                <asp:GridView ID="listGridView" runat="server" 
                    EnableModelValidation="True" 
                    AutoGenerateColumns="False" 
                    CssClass="mGrid"
                    PagerStyle-CssClass="pgr"
                    AlternatingRowStyle-CssClass="alt"
                    AllowPaging="True"         
                    PageSize="1000"
                    onpageindexchanging="listGridView_PageIndexChanging" 
                    onrowdatabound="listGridView_RowDataBound">
                    <AlternatingRowStyle CssClass="alt" />
                    <Columns>                                          
                        <asp:TemplateField HeaderStyle-Width="20px">
                            <HeaderTemplate>
                                <asp:CheckBox runat="server" ID="headerCheckBoxID" oncheckedchanged="headerCheckBoxID_CheckedChanged" AutoPostBack="true" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="listCheckBoxID" />
                                <asp:HiddenField runat="server" ID="indexIDHiddenField" />
                            </ItemTemplate>
                        </asp:TemplateField>  
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                    <SelectedRowStyle BackColor="#CCCCFF" />
                </asp:GridView>
            </asp:Panel>
            
            <asp:Panel ID="newPanel" runat="server" Visible="False" ></asp:Panel> 

            <asp:Panel ID="editPanel" runat="server" Visible="False" >
                <div class="leftColumn">
                    <div class="form">
                        <fieldset>
                            <legend>Editarea datelor - sheet 1</legend>
                            <p>
                                <label> Numele: </label>
                                <asp:TextBox ID="editNumeTextBox" runat="server" />
                            </p><!-- nume -->
                            <p>
                                <label> Prenumele: </label>
                                <asp:TextBox ID="editPrenumeTextBox" runat="server" />
                            </p><!-- prenume -->
                            <p>
                                <label> Gen: </label>
                                <asp:DropDownList ID="editGenDDL" runat="server" />
                            </p><!-- gen -->                           
                            <p>
                                <label> Adresa: </label>
                                <asp:TextBox ID="editAdresaTextBox" runat="server" />
                            </p><!-- adresa -->
                        </fieldset>
                    </div>
                </div>

                <div class="rightColumn">
                    <div class="form">
                        <fieldset> 
                            <legend>sheet 2</legend>                
                            <p>
                                <label> Telefon Fix: </label>
                                <asp:TextBox ID="editTelefonFixTextBox" runat="server" />
                            </p><!-- telefon fix -->
                            <p>
                                <label> Telefon GSM: </label>
                                <asp:TextBox ID="editTelefonGSMTextBox" runat="server" />
                            </p><!-- telefon gsm -->
                            <p>
                                <label> Email: </label>
                                <asp:TextBox ID="editEmailTextBox" runat="server" />
                            </p><!-- email -->                             
                            <asp:HiddenField ID="editPersonIDHiddenField" runat="server" />
                        </fieldset>
                    </div>
                </div>

                <div class="clear"></div>

                <div class="centerBox" style="width:150px">
                    <asp:Button ID="editSaveButton"  runat="server" Text="Save" onclick="editSaveButton_Click"   />
                    <asp:Button ID="editCancelButton" runat="server" Text="Cancel"  onclick="editCancelButton_Click"  />
                </div>
            </asp:Panel>


        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

